QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Macintosh Draw Context Structure

QuickDraw 3D defines the Macintosh draw context data structure to maintain information that is specific to Macintosh draw contexts. The Macintosh draw context data structure is defined by the TQ3MacDrawContextData data type.

typedef struct TQ3MacDrawContextData {
    TQ3DrawContextData                              drawContextData;
    CWindowPtr                                      window;
    TQ3MacDrawContext2DLibrary                      library;
    gxViewPort                                      viewPort;
    CGrafPtr                                        grafPort;
} TQ3MacDrawContextData;
drawContextData
A draw context data structure defining basic information about the draw context.
window
A pointer to a window.
library
The two-dimensional graphics library to use when rendering an image. You can use these constants to specify a 2D graphics library:
                    typedef enum TQ3MacDrawContext2DLibrary {
                        kQ3Mac2DLibraryNone,
                        kQ3Mac2DLibraryQuickDraw,
                        kQ3Mac2DLibraryQuickDrawGX
                    } TQ3MacDrawContext2DLibrary;
The constants kQ3Mac2DLibraryQuickDraw and kQ3Mac2DLibraryQuickDrawGX indicate that the renderer should use QuickDraw or QuickDraw GX, respectively, in the final stage of rendering. Either the viewPort or the grafPort field must contain a non-null value if QuickDraw or QuickDraw GX is to be used. The two-dimensional library is used only when copying from the back to the front buffer, never when drawing directly to the front buffer.
viewPort
A view port, as defined by QuickDraw GX. See the book Inside Macintosh: QuickDraw GX Objects for complete information about view ports.
grafPort
A graphics port, as defined by QuickDraw. See the book Inside Macintosh: Imaging With QuickDraw for complete information about graphics ports.

© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |